<%@ page import="Dao.UserDao" %>
<%@ page import="Vo.User" %><%--
  Created by IntelliJ IDEA.
  User: Cly
  Date: 2021-12-21
  Time: 15:04
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>修改密码</title>
    <script src="jquery.js" type="text/javascript"></script>
    <link rel="stylesheet" type="text/css" href="主页.css" />
</head>
<body>
<%
    //String uid=request.getParameter(uid);
    User user=(User)session.getAttribute("user");
    String pic = user.getPic();
%>
<div class="column left">
    <div class="yuan container">
        <h3>欢迎您登录论坛</h3>
        <div class="circle">
            <img src="<%=user.getPic()%>" id="img2" name="img2" height="50px" width="50px"/>
        </div>
        <p><%=user.getUsername()%></p>
        <div id="nav">
            <ul class="firstNav">
                <li>
                    <a href="postMessage.jsp">我要发帖</a>
                </li>
                <li>
                    <a href="change.jsp">修改密码</a>
                </li>
                <li>
                    <a href="login.jsp">注销账户</a>
                </li>
                <li>
                    <a href="home.jsp">返回主页</a>
                </li>
            </ul>
        </div>
    </div>
</div>

<div class="main container">
<form action="changeAction.jsp" name="form2" method="post" style="text-align:center">
    <select id="s1" name="pic1">
        <option value="1.jpg">可爱</option>
        <option value="2.jpg">鳄鱼</option>
        <option value="3.jpg">女孩</option>
    </select><BR>
            输入旧密码：<input name="password1" type="password">
            <font color="red">${requestScope.passwordMess1}</font><BR><BR>
            输入新密码：<input name="password2" type="password"><BR>
            确定新密码：<input name="password3" type="password">
            <font color="red">${requestScope.passwordMess2}</font><BR><BR>
            <input type="submit" value="确认提交" >
</form>
</div>
<script>
    $("#s1").change(function () {
        $("#img2").attr("src", $(this).val());
    });
</script>
</body>
</html>
